import 'dart:convert';

import 'package:flutter/cupertino.dart';
import 'package:get/get.dart';

import 'xin_he_photo_gallery_scan_state.dart';

class XinHePhotoGalleryScanLogic extends GetxController {
  final XinHePhotoGalleryScanState state = XinHePhotoGalleryScanState();
  late  PageController controller;

  @override
  void onInit() {
    // TODO: implement onInit
    super.onInit();
    state.callbackIndex = Get.arguments;
    Map map = Get.parameters;
    Map<String, dynamic> data = json.decode(map['data']);
    state.images.value = data['images'];
    state.currentIndex.value = data['index'];
    controller = PageController(initialPage: state.currentIndex.value);
  }


}
